package com.wzy.web.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * PmDeledate entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "pm_deledate", catalog = "saozhe")
public class PmDeledate implements java.io.Serializable {

	// Fields

	private Integer deledateId;
	private PmUser pmUserByProjectDeledateId;
	private PmProject pmProject;
	private PmUser pmUserByProjectleaderId;

	// Constructors

	/** default constructor */
	public PmDeledate() {
	}

	/** full constructor */
	public PmDeledate(PmUser pmUserByProjectDeledateId, PmProject pmProject,
			PmUser pmUserByProjectleaderId) {
		this.pmUserByProjectDeledateId = pmUserByProjectDeledateId;
		this.pmProject = pmProject;
		this.pmUserByProjectleaderId = pmUserByProjectleaderId;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "deledateId", unique = true, nullable = false)
	public Integer getDeledateId() {
		return this.deledateId;
	}

	public void setDeledateId(Integer deledateId) {
		this.deledateId = deledateId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "projectDeledateId", nullable = false)
	public PmUser getPmUserByProjectDeledateId() {
		return this.pmUserByProjectDeledateId;
	}

	public void setPmUserByProjectDeledateId(PmUser pmUserByProjectDeledateId) {
		this.pmUserByProjectDeledateId = pmUserByProjectDeledateId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "projectId", nullable = false)
	public PmProject getPmProject() {
		return this.pmProject;
	}

	public void setPmProject(PmProject pmProject) {
		this.pmProject = pmProject;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "projectleaderId", nullable = false)
	public PmUser getPmUserByProjectleaderId() {
		return this.pmUserByProjectleaderId;
	}

	public void setPmUserByProjectleaderId(PmUser pmUserByProjectleaderId) {
		this.pmUserByProjectleaderId = pmUserByProjectleaderId;
	}

}